#pragma once
template <typename T>
class Rational
{
public:
	Rational(const T& numerator = 0,
		const T& denominator = 1);
	const T numerator() const;
	const T denominator() const;

	friend 
		const Rational operator* (const Rational& lhs, const Rational& rhs)
	{
		return Rational(lhs.num * rhs.num, lhs.deno * rhs.deno);
	}
private:
	T num, deno;
};

template <typename T>
Rational<T>::Rational(const T& numerator = 0,
		const T& denominator = 1): num(numerator), deno(denominator)
{
}

template <typename T>
const T Rational<T>::numerator() const
{
	return num;
}

template <typename T>
const T Rational<T>::denominator() const
{
	return deno;
}
